package com.example.apione.controller.index;

import com.example.apione.dao.ApiInfoDao;
import com.example.apione.entity.ApiInfo;
import com.example.apione.model.getApimodel;
import com.example.apione.utils.ResponseResult;
import lombok.Data;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
/**
 * @author 尘落
 * @date 2023/2/23
 */
@Data
@RestController
public class searchApi {
    private final ApiInfoDao apiInfoDao;
    @GetMapping("/api/search")
    public ResponseResult<List<ApiInfo>> search(@RequestParam("search") String param){
        return getApimodel.searchapi(apiInfoDao,param);
    }

}
